package dao;

import conexao.FazConexao;
import modelo.Conta;
import java.sql.*;
import java.sql.PreparedStatement;

public class ContaDAO {
	private Connection connection;
	
	Long codigo;
	String nome;
	String cpf;
	String email;
	String telefone;
		
		public ContaDAO() {
			this.connection = new FazConexao().getConnection();
		}
		
		public void adiciona(Conta conta){
			String sql = "";
			try {
                PreparedStatement stmt = connection.prepareStatement(sql);

                stmt.setString(1, conta.getDescr());
                stmt.setString(2, conta.getVenc());
				stmt.setDouble(3, conta.getJuros());
				stmt.setDouble(4, conta.getMulta());
				stmt.setDouble(5, conta.getValor());
				
				stmt.execute();
				stmt.close();
			} catch (SQLException u) {
				throw new RuntimeException(u);
			}
		}
}
